#include<stdio.h>
int main()
{
	long long int sum = 0;
	for (int i = 1; i < 21; i++) {
		long long int stemp = 1;
		for (int j = 1; j <= i; j++) {
			stemp = stemp * j; 
		}
		sum = sum + stemp;
	}
	printf("%lld", sum);
}


